<html>
<head>
	<title>预览</title>
    <meta charset="UTF-8">

    <link rel="stylesheet" type="text/css" href="{$contextPath}/pas/easyui/themes/{$page_theme | default: 'default'}/easyui.css">
    <link rel="stylesheet" type="text/css" href="{$contextPath}/pas/easyui/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="{$contextPath}/pas/style/my.css">
    
    <script type="text/javascript" src="{$contextPath}/pas/easyui/jquery.min.js"></script>
    <script type="text/javascript" src="{$contextPath}/pas/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="{$contextPath}/pas/javascript/my.js"></script>
    
	{literal}
	<script language="javascript">
	function auditOK(comment_id) {
        $.post('/cms/Comment/auditForOK.xdo',{comment_id: comment_id},function(result){
            if (result.ReturnCode == 0){
                window.location.reload();
            } else {
                $.messager.show({    // show error message
                    title: 'Error',
                    msg: result.Msg
                });
            }
        },'json');

	}
	function auditNOK(comment_id) {
        $.post('/cms/Comment/auditForNOK.xdo',{comment_id: comment_id},function(result){
            if (result.ReturnCode == 0){
                window.location.reload();
            } else {
                $.messager.show({    // show error message
                    title: 'Error',
                    msg: result.Msg
                });
            }
        },'json');
	}
	function deleteComment(comment_id) {
		$.messager.confirm('删除确认！','删除后不能恢复，确认删除么?',function(r){
			if(r){
		        $.post('/cms/Comment/deleteComments.xdo',{comment_id: comment_id},function(result){
		            if (result.ReturnCode == 0){
		                window.location.reload();
		            } else {
		                $.messager.show({    // show error message
		                    title: 'Error',
		                    msg: result.Msg
		                });
		            }
		        },'json');
		    }
		});
	}
	</script>
	{/literal}
</head>
<body>
{widget template="statics/cms/inc/content.tpl" moduleId="cms" serviceId="ContentService:findById" params="content_id=`$Request.content_id`" }
<hr>
<h4>评论</h4>
{widget template="statics/cms/inc/comment.tpl" moduleId="cms" serviceId="Comment:findByContentId" params="content_id=`$Request.content_id`" }

</body>
</html>